 <html>
 <head>
 <title>h_definition.f90</title>                                                
                                                                                
                                           
 </head>
 <body>
MODULE DEFINITION <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  USE LIELIB_YANG_BERZ, JUNK_NO=>NO,JUNK_ND=>ND,JUNK_ND2=>ND2,JUNK_NDPT=>NDPT,JUNK_NV=>NV <br>                                                                                                                                                                                                                                                                                                                                                                                                                      
  USE C_DABNEW <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  IMPLICIT NONE <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
  PUBLIC <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  LOGICAL(LP) :: NEWREAD=.FALSE. ,NEWPRINT =  .FALSE. , FIRST_TIME = .TRUE. <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
  LOGICAL(LP) :: PRINT77=.TRUE. ,READ77 =  .TRUE. <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  LOGICAL(LP) :: NO_NDUM_CHECK = .FALSE. <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  LOGICAL(LP),TARGET :: INSANE_PTC = .FALSE. <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  LOGICAL(LP),TARGET :: SETKNOB = .FALSE.<font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Real part of knobs cannot set </font><br>                                                                                                                                                                                                                                                                                                                                                                
  LOGICAL(LP),TARGET :: KNOB=.TRUE.<font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Knobs are effective </font><br>                                                                                                                                                                                                                                                                                                                                                                                
  INTEGER, TARGET :: NPARA_FPP<font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; position of last non-parameter tpsa variable </font><br>                                                                                                                                                                                                                                                                                                                                                            
  COMPLEX(DP), PARAMETER :: I_ = ( 0.0_DP,1.0_DP ) <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
  INTEGER MASTER,C_MASTER <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
  INTEGER IASSDOLUSER(NDUMT) <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  INTEGER DUMMY <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
  INTEGER IASS0USER(NDUMT) <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  INTEGER C_DUMMY <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  INTEGER C_IASS0USER(NDUMT) <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  INTEGER C_IASSDOLUSER(NDUMT) <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  INTEGER,PARAMETER::NDIM2=2*NDIM <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  INTEGER,PARAMETER::MMMMMM1=1,MMMMMM2=2,MMMMMM3=3,MMMMMM4=4 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  LOGICAL(LP) :: KNOB_NUMERICAL=.FALSE. <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
  REAL(DP) ::  KNOB_EPS(LNV)=1E-6_DP <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  INTEGER ::  KNOB_I =0 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
  INTEGER,PARAMETER::NMAX=20 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  INTEGER,PRIVATE,PARAMETER::N_MAX=10 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
  INTEGER, PARAMETER :: CASE1=1,CASE2=2, CASE0=0, CASEP1=-1,CASEP2=-2 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
  INTEGER, PARAMETER :: CASET=3,CASETF1=4,CASETF2=5 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
  INTEGER,PARAMETER  :: ISPIN0R=1,ISPIN1R=3 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
  LOGICAL(LP) :: DOING_AC_MODULATION_IN_PTC=.FALSE. <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
  INTEGER, TARGET :: NB_ =0 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
  INTEGER, PARAMETER :: NDIM2T=10 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
 <a name="SUB_TAYLOR"></a>
<font color="#FF00FF">  TYPE SUB_TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER J(LNV)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER MIN,MAX</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font color="#FF00FF">  END TYPE SUB_TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="TAYLOR"></a>
<font color="#FF00FF">  TYPE TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER I</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  integer I is a pointer in old da-package of Berz </font><br>                                                                                                                                                                                                                                                                                                                   
<font color="#FF00FF">  END TYPE TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                
  TYPE(TAYLOR) TEMP <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font color="#FF0000"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  UNIVERSAL_TAYLOR is used by Sagan in BMAD Code at Cornell </font><br>                                                                                                                                                                                                                                                                                                                                                                            
<font color="#FF0000"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  Also used by MAD-XP </font><br>                                                                                                                                                                                                                                                                                                                                                                                                                  
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="UNIVERSAL_TAYLOR"></a>
<font color="#FF00FF">  TYPE UNIVERSAL_TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER, POINTER:: N,NV</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP), POINTER,DIMENSION(:)::C</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER, POINTER,DIMENSION(:,:)::J</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE UNIVERSAL_TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                      
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="COMPLEXTAYLOR"></a>
<font color="#FF00FF">  TYPE COMPLEXTAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) R</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Real part </font><br>                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) I</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Imaginary part </font><br>                                                                                                                                                                                                                                                                                                                                                
<font color="#FF00FF">  END TYPE COMPLEXTAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                         
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL_8"></a>
<font color="#FF00FF">  TYPE REAL_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) T</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  USED IF TAYLOR </font><br>                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) R</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;    USED IF REAL </font><br>                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER KIND</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  0,1,2,3 (1=REAL,2=TAYLOR,3=TAYLOR KNOB, 0=SPECIAL) </font><br>                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER I</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;   USED FOR KNOBS AND SPECIAL KIND=0 </font><br>                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) S</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;   SCALING FOR KNOBS AND SPECIAL KIND=0 </font><br>                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP) :: ALLOC</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; IF TAYLOR IS ALLOCATED IN DA-PACKAGE </font><br>                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER G,NB</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font color="#FF00FF">  END TYPE REAL_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="DOUBLE_COMPLEX"></a>
<font color="#FF00FF">  TYPE DOUBLE_COMPLEX </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (COMPLEXTAYLOR) T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     COMPLEX(DP) R</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP) ALLOC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER KIND</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER I,J</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     COMPLEX(DP) S</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER G,NB</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font color="#FF00FF">  END TYPE DOUBLE_COMPLEX </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                        
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  TYPE(TAYLOR)        VARF1,VARF2 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  TYPE(COMPLEXTAYLOR) VARC1,VARC2 <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="SPINOR"></a>
<font color="#FF00FF">  TYPE SPINOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) X(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font color="#FF00FF">  END TYPE SPINOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="SPINOR_8"></a>
<font color="#FF00FF">  TYPE SPINOR_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8) X(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font color="#FF00FF">  END TYPE SPINOR_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="RES_SPINOR_8"></a>
<font color="#FF00FF">  TYPE RES_SPINOR_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(DOUBLE_COMPLEX) X(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font color="#FF00FF">  END TYPE RES_SPINOR_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                          
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="DASCRATCH"></a>
<font color="#FF00FF">  TYPE DASCRATCH </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(TAYLOR), POINTER :: T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH),POINTER :: PREVIOUS</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH),POINTER :: NEXT</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                      
<font color="#FF00FF">  END TYPE DASCRATCH </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="DALEVEL"></a>
<font color="#FF00FF">  TYPE DALEVEL </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER,  POINTER :: N</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP),POINTER ::CLOSED</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH), POINTER :: PRESENT</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH), POINTER :: END</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH), POINTER :: START</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH), POINTER :: START_GROUND</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DASCRATCH), POINTER :: END_GROUND</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                               
<font color="#FF00FF">  END TYPE DALEVEL </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="DAMAP"></a>
<font color="#FF00FF">  TYPE DAMAP </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) V(NDIM2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font color="#FF00FF">  END TYPE DAMAP </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="GMAP"></a>
<font color="#FF00FF">  TYPE GMAP </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) V(LNV)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER N</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font color="#FF00FF">  END TYPE GMAP </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="VECFIELD"></a>
<font color="#FF00FF">  TYPE VECFIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) V(NDIM2)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; <font face="Times New Roman">V<sub>i</sub>&#8706;<sub>i</sub></font> Operator </font><br>                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER IFAC</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Type of Factorization 0,1,-1 (One exponent, Dragt-Finn, Reversed Dragt-Finn) </font><br>                                                                                                                                                                                                                                                                                     
<font color="#FF00FF">  END TYPE VECFIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="PBFIELD"></a>
<font color="#FF00FF">  TYPE PBFIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) H</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER IFAC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER ND_USED</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font color="#FF00FF">  END TYPE PBFIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 <a name="TREE"></a>
<font color="#FF00FF">  TYPE TREE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) BRANCH(NDIM2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#FF00FF">  END TYPE TREE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="RADTAYLOR"></a>
<font color="#FF00FF">  TYPE RADTAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) V</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) E(NDIM2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font color="#FF00FF">  END TYPE RADTAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="DRAGTFINN"></a>
<font color="#FF00FF">  TYPE DRAGTFINN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP)  CONSTANT(NDIM2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) LINEAR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (VECFIELD) NONLINEAR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (PBFIELD)  PB</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE DRAGTFINN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REVERSEDRAGTFINN"></a>
<font color="#FF00FF">  TYPE REVERSEDRAGTFINN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP)  CONSTANT(NDIM2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) LINEAR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (VECFIELD) NONLINEAR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (PBFIELD)  PB</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE REVERSEDRAGTFINN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                      
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="ONELIEEXPONENT"></a>
<font color="#FF00FF">  TYPE ONELIEEXPONENT </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) EPS</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (VECFIELD) VECTOR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (PBFIELD)  PB</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE ONELIEEXPONENT </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                        
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="NORMALFORM"></a>
<font color="#FF00FF">  TYPE NORMALFORM </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) A_T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) A1</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Dispersion </font><br>                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (REVERSEDRAGTFINN) A</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Linear A_t and nonlinear A_t </font><br>                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DRAGTFINN) NORMAL</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Normal is the Normal Form R </font><br>                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) DHDJ</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Contains the tunes in convenient form: extracted from NORMAL (=R) </font><br>                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) TUNE(NDIM),DAMPING(NDIM)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; linear tune and linear damping </font><br>                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER NORD,JTUNE</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; nord=1 A1 first order in parameters </font><br>                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER NRES,M(NDIM,NRESO),PLANE(NDIM)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; NRES,M(NDIM,NRESO) -> resonances left in the map </font><br>                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP) AUTO</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font color="#FF00FF">  END TYPE NORMALFORM </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="GENFIELD"></a>
<font color="#FF00FF">  TYPE GENFIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) H</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) M</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR) D(NDIM,NDIM)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) LINEAR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) LINEART</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (DAMAP) MT</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) CONSTANT(NDIM2),EPS</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER IMAX</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; imax=Maximum Number of Iteration (default=1000) </font><br>                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER IFAC</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; ifac = the map is raised to the power 1/ifac and iterated ifac times (default=1) </font><br>                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP) LINEAR_IN</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Linear part is left in the map  (default=.false.) </font><br>                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER NO_CUT</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Original map is not symplectic on and above no_cut </font><br>                                                                                                                                                                                                                                                                                                             
<font color="#FF00FF">  END TYPE GENFIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="PBRESONANCE"></a>
<font color="#FF00FF">  TYPE PBRESONANCE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (PBFIELD)  COS,SIN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER IFAC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font color="#FF00FF">  END TYPE PBRESONANCE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="VECRESONANCE"></a>
<font color="#FF00FF">  TYPE VECRESONANCE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (VECFIELD)  COS,SIN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER IFAC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font color="#FF00FF">  END TYPE VECRESONANCE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                          
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="TAYLORRESONANCE"></a>
<font color="#FF00FF">  TYPE TAYLORRESONANCE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (TAYLOR)  COS,SIN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font color="#FF00FF">  END TYPE TAYLORRESONANCE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                       
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="TREE_ELEMENT"></a>
<font color="#FF00FF">  TYPE  TREE_ELEMENT </font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  USED FOR FAST TRACKING IN O_TREE_ELEMENT.F90 </font><br>                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) ,  DIMENSION(:), POINTER :: CC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) ,  DIMENSION(:), POINTER :: FIX</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER,  DIMENSION(:), POINTER :: JL,JV</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER,POINTER :: N,ND2,NO</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#FF00FF">  END  TYPE TREE_ELEMENT </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                         
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="SPINMATRIX"></a>
<font color="#FF00FF">  TYPE SPINMATRIX </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8) S(3,3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font color="#FF00FF">  END TYPE SPINMATRIX </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="DAMAPSPIN"></a>
<font color="#FF00FF">  TYPE DAMAPSPIN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(DAMAP) M</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(SPINMATRIX) S</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) E_IJ(6,6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE DAMAPSPIN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="NORMAL_SPIN"></a>
<font color="#FF00FF">  TYPE NORMAL_SPIN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(NORMALFORM) N</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(DAMAPSPIN) A1</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(DAMAPSPIN) AR</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(DAMAPSPIN) AS</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(DAMAPSPIN) A_T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER M(NDIM,NRESO),MS(NRESO),NRES</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8) N0(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8) THETA0</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) NU</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) S_IJ0(6,6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     COMPLEX(DP) S_IJR(6,6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) EMITTANCE(3),TUNE(3),DAMPING(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP) AUTO,STOCHASTIC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP)  KICK(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP)  STOCH(6,6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP)  STOCH_INV(6,6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                              
<font color="#FF00FF">  END TYPE NORMAL_SPIN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  INCLUDE "A_DEF_FRAME_PATCH_CHART.INC" <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
  INCLUDE "A_DEF_ALL_KIND.INC" <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  INCLUDE "A_DEF_SAGAN.INC" <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
  INCLUDE "A_DEF_ELEMENT_FIBRE_LAYOUT.INC" <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  TYPE(FIBRE), POINTER :: LOST_FIBRE <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  TYPE(INTEGRATION_NODE), POINTER :: LOST_NODE <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="RF_PHASOR"></a>
<font color="#FF00FF">  TYPE RF_PHASOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) X(2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) OM</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font color="#FF00FF">  END TYPE RF_PHASOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="RF_PHASOR_8"></a>
<font color="#FF00FF">  TYPE RF_PHASOR_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8)  X(2)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8) OM</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font color="#FF00FF">  END TYPE RF_PHASOR_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="PROBE"></a>
<font color="#FF00FF">  TYPE PROBE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) X(6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(SPINOR) S(ISPIN0R:ISPIN1R)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(RF_PHASOR) AC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL U</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(INTEGRATION_NODE),POINTER :: LOST_NODE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#FF00FF">  END TYPE PROBE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="PROBE_8"></a>
<font color="#FF00FF">  TYPE PROBE_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(REAL_8) X(6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(SPINOR_8) S(ISPIN0R:ISPIN1R)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(RF_PHASOR_8) AC</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) E_IJ(6,6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL U</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(INTEGRATION_NODE),POINTER :: LOST_NODE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#FF00FF">  END TYPE PROBE_8 </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="TEMPORAL_PROBE"></a>
<font color="#FF00FF">  TYPE TEMPORAL_PROBE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(PROBE)  XS</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(INTEGRATION_NODE), POINTER :: NODE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP)  DS,POS(6)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font color="#FF00FF">  END TYPE TEMPORAL_PROBE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                        
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="TEMPORAL_BEAM"></a>
<font color="#FF00FF">  TYPE TEMPORAL_BEAM </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(TEMPORAL_PROBE), POINTER :: TP(:)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) A(3),ENT(3,3),P0C,TOTAL_TIME</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER N</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(INTEGRATION_NODE),POINTER :: C</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(INTERNAL_STATE)  STATE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#FF00FF">  END TYPE TEMPORAL_BEAM </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                         
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_TAYLOR"></a>
<font color="#FF00FF">  TYPE C_TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER I</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  integer I is a pointer to the complexified Berz package </font><br>                                                                                                                                                                                                                                                                                                            
<font color="#FF00FF">  END TYPE C_TAYLOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_DASCRATCH"></a>
<font color="#FF00FF">  TYPE C_DASCRATCH </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(C_TAYLOR), POINTER :: T</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH),POINTER :: PREVIOUS</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH),POINTER :: NEXT</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE C_DASCRATCH </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_DALEVEL"></a>
<font color="#FF00FF">  TYPE C_DALEVEL </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER,  POINTER :: N</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     LOGICAL(LP),POINTER ::CLOSED</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH), POINTER :: PRESENT</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH), POINTER :: END</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH), POINTER :: START</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH), POINTER :: START_GROUND</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_DASCRATCH), POINTER :: END_GROUND</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                             
<font color="#FF00FF">  END TYPE C_DALEVEL </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_SPINMATRIX"></a>
<font color="#FF00FF">  TYPE C_SPINMATRIX </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(C_TAYLOR) S(3,3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font color="#FF00FF">  END TYPE C_SPINMATRIX </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                          
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_SPINOR"></a>
<font color="#FF00FF">  TYPE C_SPINOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(C_TAYLOR) V(3)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font color="#FF00FF">  END TYPE C_SPINOR </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_DAMAP"></a>
<font color="#FF00FF">  TYPE C_DAMAP </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE (C_TAYLOR) V(LNV)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Orbital part of the map </font><br>                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     INTEGER :: N=0</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Number of plane allocated </font><br>                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     TYPE(C_SPINMATRIX) S</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Spin matrix </font><br>                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     COMPLEX(DP) E_IJ(6,6)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Stochastic fluctuation in radiation theory </font><br>                                                                                                                                                                                                                                                                                                              
<font color="#FF00FF">  END TYPE C_DAMAP </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_VECTOR_FIELD"></a>
<font color="#FF00FF">  TYPE C_VECTOR_FIELD </font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Vector filed </font><br>                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      INTEGER :: N=0,NRMAX</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; n dimension used v(1:n) (nd2 by default) ; nrmax some big integer if eps<1 </font><br>                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      REAL(DP) EPS</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; if eps=-integer  then |eps| Lie brackets are taken ; otherwse eps=eps_tpsalie=10^-9 </font><br>                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE (C_TAYLOR) V(LNV)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                               
<font color="#FF00FF">  END TYPE C_VECTOR_FIELD </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                        
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_FACTORED_LIE"></a>
<font color="#FF00FF">  TYPE C_FACTORED_LIE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      INTEGER :: N= 0</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      INTEGER :: DIR= 0</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       TYPE (C_VECTOR_FIELD), ALLOCATABLE :: F(:)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                          
<font color="#FF00FF">  END TYPE C_FACTORED_LIE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                        
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="C_NORMAL_FORM"></a>
<font color="#FF00FF">  TYPE C_NORMAL_FORM </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_DAMAP) A1</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; brings to fix point at least linear </font><br>                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_DAMAP) A2</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; linear normal form </font><br>                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_FACTORED_LIE) G</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; nonlinear part of a in phasors </font><br>                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_FACTORED_LIE) KER</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  kernel i.e. normal form in phasors </font><br>                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_DAMAP) A_T</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; transformation a (m=a n a^-1) </font><br>                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_DAMAP) N</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; transformation n (m=a n a^-1) </font><br>                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      TYPE(C_DAMAP) AS</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  For Spin   (m = As a n a^-1 As^-1) </font><br>                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      INTEGER NRES,M(NDIM2T/2,NRESO),MS(NDIM2T/2)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; stores resonances to be left in the map, including spin (ms) </font><br>                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      REAL(DP) TUNE(NDIM2T/2),DAMPING(NDIM2T/2),SPIN_TUNE</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; Stores simple information </font><br>                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     COMPLEX(DP) S_IJ0(6,6)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  equilibrium beam sizes </font><br>                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     COMPLEX(DP) S_IJR(6,6)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  equilibrium beam sizes in resonance basis </font><br>                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     REAL(DP) EMITTANCE(3)</font><font color="#009933"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594;  Equilibrium emittances as defined by Chao (computed from s_ijr(2*i-1,2*i) i=1,2,3 ) </font><br>                                                                                                                                                                                                                                                                    
<font color="#FF00FF">  END TYPE C_NORMAL_FORM </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font color="#FF0000"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; the routine c_canonize(at,a_cs,a0,a1,a2,phase) factors neatly the map "at" </font><br>                                                                                                                                                                                                                                                                                                                                                            
<font color="#FF0000"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8594; at= a_cs o rotation(phase) where  a_cs = a0 o a1 o a2 ; this gives the phase advance even nonlinear! </font><br>                                                                                                                                                                                                                                                                                                                                  
 ---------------------------------------------</br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
TYPE(C_TAYLOR) C_TEMP <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
CONTAINS <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="RESET_APERTURE_FLAG"></a>
<font color="#FF0000">  SUBROUTINE RESET_APERTURE_FLAG(COMPLETE) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    LOGICAL(LP), OPTIONAL :: COMPLETE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    LOGICAL(LP)  COMP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    COMP=.TRUE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(PRESENT(COMPLETE)) COMP=COMPLETE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    C_%STABLE_DA =.TRUE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    C_%CHECK_STABLE =.TRUE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    C_%CHECK_MADX_APERTURE =.TRUE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    C_%STABLE_DA =.TRUE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(COMP) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       XLOST=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST=" APERTURE HAS BEEN RESET "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       NULLIFY(LOST_FIBRE)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       NULLIFY(LOST_NODE)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font color="#FF0000">  END   SUBROUTINE RESET_APERTURE_FLAG </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                           
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="PRODUCE_APERTURE_FLAG"></a>
<font color="#FF0000">  SUBROUTINE PRODUCE_APERTURE_FLAG(I) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    INTEGER I</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    I=0</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       I=1</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#FF0000">  END   SUBROUTINE PRODUCE_APERTURE_FLAG </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  ROOT(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ROOT=1.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF((X<0.0_DP).AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ROOT=1.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="ROOT UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSEIF(X>=0.0_DP) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ROOT=SQRT(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ROOT=1.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION ROOT </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  ARCSIN(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCSIN=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF((ABS(X)>1.0_DP).AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCSIN=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="ARCSIN UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSEIF(ABS(X)<=1.0_DP) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCSIN=ASIN(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCSIN=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION ARCSIN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  ARCCOS(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCCOS=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF((ABS(X)>1.0_DP).AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCCOS=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="ARCCOS UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSEIF(ABS(X)<=1.0_DP) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCCOS=ACOS(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCCOS=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION ARCCOS </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  LOGE(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       LOGE=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(X<=0.0_DP.AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       LOGE=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="LOG UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       LOGE=LOG(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                         
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION LOGE </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                              
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  COSEH(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       COSEH=1.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF((ABS(X)>C_%HYPERBOLIC_APERTURE).AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       COSEH=1.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="COSEH UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSEIF(ABS(X)<=C_%HYPERBOLIC_APERTURE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       COSEH=COSH(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       COSEH=1.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION COSEH </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  SINEH(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       SINEH=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF((ABS(X)>C_%HYPERBOLIC_APERTURE).AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       SINEH=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="SINEH UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSEIF(ABS(X)<=C_%HYPERBOLIC_APERTURE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       SINEH=SINH(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       SINEH=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                        
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION SINEH </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 <a name="REAL"></a>
<font color="#37A50B">  REAL(DP) FUNCTION  ARCTAN(X) </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IMPLICIT NONE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    REAL(DP),INTENT(IN)::X</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                 
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF(.NOT.C_%CHECK_STABLE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                          
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCTAN=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       RETURN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                              
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    IF((ABS(X)>C_%HYPERBOLIC_APERTURE).AND.C_%ROOT_CHECK) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCTAN=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       MESSAGELOST="ARCTAN UNDEFINED "</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                     
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSEIF(ABS(X)<=C_%HYPERBOLIC_APERTURE) THEN</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                            
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCTAN=ATAN(X)</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                      
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ELSE</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                   
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       ARCTAN=0.0_DP</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                       
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       C_%CHECK_STABLE=.FALSE.</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                             
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ENDIF</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                  
<font size= -1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                           
<font color="#37A50B">  END FUNCTION ARCTAN </font> <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                            
<hr color="#CC0000" size="10" align="left" noshade>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
END MODULE DEFINITION <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
 </body>
 </html>
